Optimal. Leaf size=113 \[ \frac {\sqrt {\pi } a^2 \text {erf}(a+b x)}{4 b^3}+\frac {\sqrt {\pi } a^2 \text {erfi}(a+b x)}{4 b^3}+\frac {\sqrt {\pi } \text {erf}(a+b x)}{8 b^3}-\frac {\sqrt {\pi } \text {erfi}(a+b x)}{8 b^3}-\frac {a \sinh \left ((a+b x)^2\right )}{b^3}+\frac {(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {5365, 6742, 5299, 2204, 2205, 5321, 2637, 5325, 5298} \[ \frac {\sqrt {\pi } a^2 \text {Erf}(a+b x)}{4 b^3}+\frac {\sqrt {\pi } a^2 \text {Erfi}(a+b x)}{4 b^3}+\frac {\sqrt {\pi } \text {Erf}(a+b x)}{8 b^3}-\frac {\sqrt {\pi } \text {Erfi}(a+b x)}{8 b^3}-\frac {a \sinh \left ((a+b x)^2\right )}{b^3}+\frac {(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2204
Rule 2205
Rule 2637
Rule 5298
Rule 5299
Rule 5321
Rule 5325
Rule 5365
Rule 6742
Rubi steps
\begin {align*} \int x^2 \cosh \left ((a+b x)^2\right ) \, dx &=\frac {\operatorname {Subst}\left (\int (-a+x)^2 \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2 \cosh \left (x^2\right )-2 a x \cosh \left (x^2\right )+x^2 \cosh \left (x^2\right )\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac {\operatorname {Subst}\left (\int x^2 \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}-\frac {(2 a) \operatorname {Subst}\left (\int x \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}+\frac {a^2 \operatorname {Subst}\left (\int \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac {(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}-\frac {\operatorname {Subst}\left (\int \sinh \left (x^2\right ) \, dx,x,a+b x\right )}{2 b^3}-\frac {a \operatorname {Subst}\left (\int \cosh (x) \, dx,x,(a+b x)^2\right )}{b^3}+\frac {a^2 \operatorname {Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{2 b^3}+\frac {a^2 \operatorname {Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{2 b^3}\\ &=\frac {a^2 \sqrt {\pi } \text {erf}(a+b x)}{4 b^3}+\frac {a^2 \sqrt {\pi } \text {erfi}(a+b x)}{4 b^3}-\frac {a \sinh \left ((a+b x)^2\right )}{b^3}+\frac {(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}+\frac {\operatorname {Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{4 b^3}-\frac {\operatorname {Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{4 b^3}\\ &=\frac {\sqrt {\pi } \text {erf}(a+b x)}{8 b^3}+\frac {a^2 \sqrt {\pi } \text {erf}(a+b x)}{4 b^3}-\frac {\sqrt {\pi } \text {erfi}(a+b x)}{8 b^3}+\frac {a^2 \sqrt {\pi } \text {erfi}(a+b x)}{4 b^3}-\frac {a \sinh \left ((a+b x)^2\right )}{b^3}+\frac {(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 62, normalized size = 0.55 \[ \frac {\sqrt {\pi } \left (2 a^2+1\right ) \text {erf}(a+b x)+\sqrt {\pi } \left (2 a^2-1\right ) \text {erfi}(a+b x)-4 (a-b x) \sinh \left ((a+b x)^2\right )}{8 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 164, normalized size = 1.45 \[ \frac {{\left (\sqrt {\pi } {\left (2 \, a^{2} + 1\right )} \sqrt {b^{2}} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} + \sqrt {\pi } {\left (2 \, a^{2} - 1\right )} \sqrt {b^{2}} \operatorname {erfi}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} - 2 \, b^{2} x + 2 \, a b + 2 \, {\left (b^{2} x - a b\right )} e^{\left (2 \, b^{2} x^{2} + 4 \, a b x + 2 \, a^{2}\right )}\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{8 \, b^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [C] time = 0.17, size = 137, normalized size = 1.21 \[ -\frac {\frac {i \, \sqrt {\pi } {\left (2 \, a^{2} - 1\right )} \operatorname {erf}\left (i \, b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {2 \, {\left (b {\left (x + \frac {a}{b}\right )} - 2 \, a\right )} e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{8 \, b^{2}} - \frac {\frac {\sqrt {\pi } {\left (2 \, a^{2} + 1\right )} \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} + \frac {2 \, {\left (b {\left (x + \frac {a}{b}\right )} - 2 \, a\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{8 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.13, size = 136, normalized size = 1.20 \[ -\frac {x \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{2}}+\frac {a \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{3}}+\frac {a^{2} \erf \left (b x +a \right ) \sqrt {\pi }}{4 b^{3}}+\frac {\erf \left (b x +a \right ) \sqrt {\pi }}{8 b^{3}}+\frac {x \,{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{2}}-\frac {a \,{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{3}}-\frac {i a^{2} \sqrt {\pi }\, \erf \left (i b x +i a \right )}{4 b^{3}}+\frac {i \sqrt {\pi }\, \erf \left (i b x +i a \right )}{8 b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.69, size = 818, normalized size = 7.24 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int x^2\,\mathrm {cosh}\left ({\left (a+b\,x\right )}^2\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \cosh {\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________